#ifndef GAMECONTROLLER_H
#define GAMECONTROLLER_H
#include "mainscene.h"
#include "levelscene.h"
#include "gamescene.h"
#include <QSound>
#include <gameconfig.h>
class GameController
{
public:
    GameController();
    ~GameController();
    //本类对象get方法
    static GameController* getInstance();
    //初始化main界面给controller类
    void initMainScene(MainScene *scene);
    void showMainScene();
    void hideMainScene();
    void showLevelScene();
    void hideLevelScene();
    void showGameScene(int level);
    void hideGameScene();
    void deleteGameScene();
    void playStartSound();
    void playBackSound();
    void playFlipCoinSound();
    void playWinSound();
private:
    //定义三个界面的指针变量
    LevelScene* l_levelScene;
    MainScene* m_mainScene;
    GameScene* g_gameScene;
    //静态变量——本类的对象
    static GameController* gameController;
};

#endif // GAMECONTROLLER_H
